package com.sen.uaa.config;

import com.alibaba.ttl.TransmittableThreadLocal;

import java.util.Map;

/**
 * 参数holder
 * @author esjiang
 */
public class ParamsContextHolder {

    private static final ThreadLocal<Map<String,String>> PARAMS = new TransmittableThreadLocal<>();

    public static void setParams(Map<String,String> params) {
        PARAMS.set(params);
    }

    public static Map<String,String> getParams() {
        return PARAMS.get();
    }

    public static void clear() {
        PARAMS.remove();
    }
}
